package com.sky.service.user.impl;


import com.sky.constant.BusinessStatusConstant;
import com.sky.service.user.ShopService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

@Service("userShopService")
public class ShopServiceImpl implements ShopService {
    @Autowired
    private RedisTemplate redisTemplate;



    /**
     * 获取营业状态
     *
     * @return
     */
    @Override
    public Long getStatus() {
        // 可能会出现类型转换异常
        Long status = (Long) redisTemplate.opsForValue().get(BusinessStatusConstant.SHOP_STATUS);
        return status;
    }
}
